package com.yzd.otherlearn.jvm;

/**
 * -verbose:gc  -Xms20M -Xmx20M -Xmn10M -XX:+PrintGCDetails -XX:SurvivorRatio=8 -XX:+UseSerialGC -XX:+HandlePromotionFailure
 * @author 10069212
 *
 *-XX:-PromotionFailureALot
 */
public class AllocationTest5 {
	private static final int _1MB = 1024 * 1024;
	public static void main(String[] args) {
		byte[] allocation1;
		byte[] allocation2;
		byte[] allocation3;
		byte[] allocation4;
		byte[] allocation5;
		byte[] allocation6;
		byte[] allocation7;
		
		allocation1 = new byte[_1MB * 2];
		allocation2 = new byte[_1MB * 2];
		allocation3 = new byte[_1MB * 2];
		
		allocation1 = null;
		allocation4 = new byte[_1MB * 2];
		allocation5 = new byte[_1MB * 2];
		allocation6 = new byte[_1MB * 2];
		
		allocation4 = null;
		allocation5 = null;
		allocation6 = null;
		allocation7 = new byte[_1MB * 2];
	}
}
